const express = require('express');
const app = express();
const port = 9999;

app.get('/timeout', (request, response) => {
    // 设置跨域，必须设置
    response.setHeader('Access-Control-Allow-Origin', '*');
    // 服务端设置3秒延迟
    setTimeout(() => {
        response.send('网络超时');
    }, 3000);

})

app.listen(port, () => {
    console.log('监听端口号：' + port);
})